package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BkCategoryMapper;
import com.ruoyi.system.domain.BkCategory;
import com.ruoyi.system.service.IBkCategoryService;

/**
 * 文章分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-11
 */
@Service
public class BkCategoryServiceImpl implements IBkCategoryService 
{
    @Autowired
    private BkCategoryMapper bkCategoryMapper;

    /**
     * 查询文章分类
     * 
     * @param categoryId 文章分类主键
     * @return 文章分类
     */
    @Override
    public BkCategory selectBkCategoryByCategoryId(Long categoryId)
    {
        return bkCategoryMapper.selectBkCategoryByCategoryId(categoryId);
    }

    /**
     * 查询文章分类列表
     * 
     * @param bkCategory 文章分类
     * @return 文章分类
     */
    @Override
    public List<BkCategory> selectBkCategoryList(BkCategory bkCategory)
    {
        return bkCategoryMapper.selectBkCategoryList(bkCategory);
    }

    /**
     * 新增文章分类
     * 
     * @param bkCategory 文章分类
     * @return 结果
     */
    @Override
    public int insertBkCategory(BkCategory bkCategory)
    {
        return bkCategoryMapper.insertBkCategory(bkCategory);
    }

    /**
     * 修改文章分类
     * 
     * @param bkCategory 文章分类
     * @return 结果
     */
    @Override
    public int updateBkCategory(BkCategory bkCategory)
    {
        return bkCategoryMapper.updateBkCategory(bkCategory);
    }

    /**
     * 批量删除文章分类
     * 
     * @param categoryIds 需要删除的文章分类主键
     * @return 结果
     */
    @Override
    public int deleteBkCategoryByCategoryIds(Long[] categoryIds)
    {
        return bkCategoryMapper.deleteBkCategoryByCategoryIds(categoryIds);
    }

    /**
     * 删除文章分类信息
     * 
     * @param categoryId 文章分类主键
     * @return 结果
     */
    @Override
    public int deleteBkCategoryByCategoryId(Long categoryId)
    {
        return bkCategoryMapper.deleteBkCategoryByCategoryId(categoryId);
    }
}
